package com.jxl.service;

import com.jxl.mapper.UserLoginRecordMapper;
import com.jxl.pojo.UserLoginRecord;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 用户登录记录
 * @author 江雪林
 * @create 2021-03-29
 */
@Service
public class UserLoginRecordService {
    @Resource
    private UserLoginRecordMapper userLoginRecordMapper;

    /**
     * 添加用户记录
     * @param userLoginRecord
     * @return
     */
    public boolean addRecord(UserLoginRecord userLoginRecord){
        if(userLoginRecord != null && userLoginRecord.getUserId()>0){
            return userLoginRecordMapper.addLoginRecord(userLoginRecord)>0;
        }
        return false;
    }
}
